package org.nstack.header.volume;

import org.nstack.header.message.APIDeleteMessage;
import org.nstack.header.message.APIParam;
import org.springframework.http.HttpMethod;
import org.nstack.header.identity.Action;
import org.nstack.header.rest.RestRequest;


@Action(category = VolumeConstant.ACTION_CATEGORY)
@RestRequest(
        path = "/volumes/{uuid}",
        method = HttpMethod.DELETE,
        responseClass = APIDeleteDataVolumeEvent.class
)
public class APIDeleteDataVolumeMsg extends APIDeleteMessage implements VolumeMessage {

    @APIParam(checkAccount = true, operationTarget = true)
    private String uuid;

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public String getVolumeUuid() {
        return uuid;
    }
 
    public static APIDeleteDataVolumeMsg __example__() {
        APIDeleteDataVolumeMsg msg = new APIDeleteDataVolumeMsg();
        msg.setUuid(uuid());
        msg.setDeletionMode(DeletionMode.Permissive);

        return msg;
    }

}
